HEVC (High Efficiency Video Coding) is an advanced video coding system being developed under the Joint Collaborative Team on Video Coding (JCT-VC) group of video coding experts from ITU-T Study Group. In HEVC Test Model Version 5.0 (HM-5.0), the inter-coded and intra-coded residues are coded using block-based transform coding. The blocks (called transform units) are partitioned from a root block (a root transform unit) using a quad-tree structure. The quad-tree partition is applied iteratively until a leaf block or a smallest block is reached. Two-dimensional transform is then applied to each of the transform units. Each TU can be split into four sub-TUs, i.e. leaf TUs. For each TU, a syntax element named cbf (coded block flag) is transmitted to indicate if the TU has non-zero transformed coefficients or not, where a “1” indicates at least one existing non-zero coefficient and a “0” indicates no non-zero coefficient.
In HM-5.0, the cbf is signaled only for leaf TUs of the residual quad-tree for the luma component. For the chroma components, the cbf is signaled for both the root TU and the leaf TU, however, the cbf is only signaled in a TU that is smaller than or equal to the maximum chroma TU size. FIG. 1 to FIG. 3 illustrate examples of the cbf signaling. In FIG. 1, block 110 shows the residual quad-tree splitting of a TU, where a root TU is partitioned into sub-TUs (TU 0 through TU 6) using quad-tree partition. Block 120 shows the corresponding cbf bits, where TUs 1, 3, 5 and 6 have non-zero coefficient and TUs 0, 2 and 4 have no non-zero coefficient. If the TU is a luma TU, the cbf bits are transmitted only for leaf TUs. An example of cbf signaling (i.e., cbf coding) for a luma TU is illustrated in FIG. 2A, where four sets of bins “0”, “1” “0101” and “1” correspond to the cbf bits for the four leaves of root TU 210. The cbf bits are signaled in a raster-scan order, i.e., in the order of upper left TU, upper right TU, lower left TU and lower right TU. For the lower left leaf TU, the TU is further partitioned into four leaf TUs. The cbf bits for this leaf TU are “0101” in the raster-scan order. Accordingly, the four sets of cbf bits 220 are shown in FIG. 2A. An example of cbf signaling for a chroma TU is illustrated in FIG. 2B, where the cbf bits are transmitted for both the root TU and the leaf TU. The root TU 230 is partitioned into four leaf TUs and the lower left leaf TU is further partition into four leaf TUs. Therefore, there are three levels of cbf bits corresponding to the three levels of TUs. For the root TU (i.e., depth=0), cbf bit “1” (indicated by reference number 240) is signaled. For the four leaf TUs of the root TU, the cbf bits are “0”, “1”, “1” and “1” (indicated by reference number 250) in the raster-scan order. For the lower left leaf TU, the TU is further partitioned into four leaf TUs with corresponding cbf bits “0”, “1” “0” and “1” (indicated by reference number 260) in the raster-scan order. As shown in FIG. 2A and FIG. 2B, while the luma TU and chroma TU have the same RQT (residual quad-tree) structure, the cbf signaling is different. The example in FIG. 2B is for root block smaller than or equal to the maximum chroma TU size. For example, given maximum chroma TU size is 16×16 and minimum chroma TU size is 4×4, the size of the root TU 230 is 16×16, and the size of each lower left leaf TU is 4×4. When the chroma leaf CU size is larger than the maximum chroma TU size, such as 32×32, there is no cbf signaled in the 32×32 level.
In order to reduce the number of cbf bits, an inferring method is used for luma and chroma TUs, where the cbf flag of the fourth leaf TU of a root TU is inferred by using the cbf flags of other TUs. Therefore, the cbf of the fourth leaf TU does not need to be transmitted.
For luma TUs, the cbf of the fourth leaf TU can be inferred from the coded block flags (cbfs) of previous three leaf TUs and the cbf of the associated root TU. Block 310 in FIG. 3 illustrates an example when the cbf of the fourth leaf TU can be inferred. The lower left TU indicated by thick-lined box 312 is partitioned into four leaf TUs, where the cbf of the fourth leaf TU is 1. Since TU 312 is partitioned into four leaf TUs, there is at least one non-zero coefficient among the four leaf TUs. When cbfs of the three previous leaf TUs are all zero (in the raster-scan order), the cbf of the last leaf TU (i.e., the fourth leaf TU) must be 1. Therefore, the cbf for the fourth leaf TU in this case can be inferred. The cbf of a leaf TU is also referred to as a leaf cbf for convenience.
For chroma TUs, the situation is different because cbf is transmitted for all level of the residual quad-tree. For the four leaf TUs associated with each root TU, the cbf for the root TU is transmitted. If the cbf of the TU is 1 (block 312 in FIG. 3), there must be at least one non-zero leaf TU among the four leaf TUs. Therefore, if the cbfs of the first three leaf TUs are all zero, the cbf of the last TU (indicated by a circle) must be 1. In this case, the last cbf can be inferred and does not need to be signaled. Moreover, the inferring mechanism can be applied to both intra and inter coded TU for the chroma component.
In HEVC, there is also a root residual flag for an inter-coded coding unit (CU). When residual flag is false, there is no need to signal all the cbfs for Y, U and V components. When the residual flag is true and TU depth of current CU is 0, the luma cbf can be inferred to be 1 if chroma cbfs are all 0. Therefore, if the cbfs for U (block 320) and V (block 330) are all 0, the cbf for the luma TU at depth 0 is inferred to be 1 as shown in FIG. 3.
In HM5.0, the maximum TU size is 16×16 for the chroma component and 32×32 for the luma component. However, the maximum CU size is 32×32 for the chroma component. Therefore, the maximum CU size and TU size are not the same. Furthermore, in HM-5.0, the chroma cbf is signaled for the TU with a size smaller or equal to the maximum TU size. For example, when the CU size is 64×64, i.e. chroma CU size is 32×32, the maximum TU size corresponds to 16×16. Therefore, four root cbfs will be transmitted for the four 16×16 chroma TUs of this 32×32 CU. In this case, even when the four cbfs are all 0, the cbfs will be transmitted, as illustrated in FIG. 4, where the size of the chroma CU 410 is 32×32.
As mentioned above, the cbf signaling method is different for the luma TU and chroma TU. It is desirable to use a unified cbf signaling method to simplify the process. In addition, the existing cbf signaling method has some redundancy and it is desirable to further improve the efficiency of the existing cbf signaling method.